<template>
	<view class="classLayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item :item="item" v-for="item in classifyList" :key="item._id"></theme-item>
		</view>
	</view>
</template>

<script setup>
import {onShareAppMessage, onShareTimeline} from '@dcloudio/uni-app'
import { apiGetClassify } from '../../api/apis';
import { ref } from 'vue';

const classifyList = ref([])
const getClassifyList = async ()=>{
	const res = await apiGetClassify({
		pageSize: 15
	})
	classifyList.value = res.data
}

getClassifyList()
//分享给好友
onShareAppMessage(()=>{
	return {
		title:"雨渐婷壁纸",
		path:"/pages/classify/classify"
	}
})
//分享朋友圈
onShareTimeline(()=>{
	return {
		title:"雨渐婷壁纸",
		query:'/pages/classify/classify'
	}
})
</script>

<style lang="scss" scoped>
.classify{
	padding:30rpx;
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap:15rpx;
}
</style>
